/**
 * @Author: 张兴
 * @Date: 2019/6/20
 * @Last Modified by:   张兴
 * @Last Modified time: 2019-09-12 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';
// index查询  全部
export const searchSPJ = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/searchSPJNoPage`, {
    params
  });
// index查询   已形成索赔单
export const searchSPJYXC = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/searchSPJYXCNoPage`, {
    params
  });
// index查询   未形成索赔单
export const searchSPJWXC = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/searchSPJWXCNoPage`, {
    params
  });
export const selectSPJList = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/selectSPJList`, {
    params
  });
// 新增
export const addUsedCarAccount = params => axios.post(`${SERVER.AUDI_USEDCAR}/collector/insert`, params);
// 删除
export const deleteUsedCarAccount = params =>
  axios.delete(`${SERVER.AUDI_USEDCAR}/collector/batchDelete`, {
    params
  });
// 索赔件删除
export const deleteSp = (id, params) =>
  axios.delete(`${SERVER.AUDI_CLAIM}/administration/partIn/deletePartIn/${id}`, {
    params
  });
// 抽屉业 查询列表 主要表：销售结算车辆表：TT_UC_SALE_SETTLE_VHL
export const getUsedCarSaleSettlePanel = params =>
  axios.get(`${SERVER.AUDI_USEDCAR}/sales/saleSettleVhl/search`, {
    params
  });

//  入库
export const saveOrUpdate = params => axios.put(`${SERVER.AUDI_CLAIM}/administration/partIn/save`, params);
//  出库
export const outClaim = params => axios.put(`${SERVER.AUDI_CLAIM}/administration/partIn/partOut`, params);

// 查询  仓库  表选
export const getSelectCk = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/getSelectCk`, {
    params
  });

// 查询 故障位置
export const selectGZWZ = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/selectGZWZ`, {
    params
  });
// 查询 厂家代码
export const selectCJDM = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/selectCJDM`, {
    params
  });
// 查询 库存统计
export const selectKCTJ = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/selectKCTJ`, {
    params
  });
// 查询 索赔件入库  然后让出库
export const selectCalimToOut = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/selectCalimToOut`, {
    params
  });

// 查询 索赔件
export const selectSPJ = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/selectSPJ`, {
    params
  });
// 添加入库索赔件
export const searchRoPartList = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/searchRoPartList`, {
    params
  });
// 查询 故障代码
export const selectGZDM = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/selectGZDM`, {
    params
  });

// 查询 委托书
export const selectWTS = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/searchRoList`, {
    params
  });

// 查询 引导数据
export const selectYDSJ = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/selectYDSJ`, {
    params
  });

// 查询索赔件数量
export const queryClaimStroage = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/queryClaimStroage`, {
    params
  });
// 查询 购买备件时委托书
// export const selectGMBJWTS = params => axios.get(`${SERVER. AUDI_CLAIM}/claim/claimOrder/selectGMBJWTS`, { params });

// 查询 故障类别
export const selectGZLB = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/selectGZLB`, {
    params
  });

// 查询 弹出框 标准工件
export const SelectBZGJ = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/SelectBZGJ`, {
    params
  });

// 查询 弹出框 特殊材料
export const SelectTSCL = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/SelectTSCL`, {
    params
  });

// 查询 弹出框 标准材料
export const SelectBJCL = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/SelectBJCL`, {
    params
  });

// 查询 弹出框 外委工位
export const SelectWWGW = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/SelectWWGW`, {
    params
  });

// 查询 索赔类别
export const getSelectSPLB = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/getSelectSPLB`, {
    params
  });
// 打印索赔件清单
export const getDyList = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/getDyList`, {
    params
  });
// 打印装箱单
export const getZxdList = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/getZxdList`, {
    params
  });
export const getDyZxdList = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/getDyZxdList`, {
    params
  });

// 查询 车辆类别
export const getSelectCLLB = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/getSelectCLLB`, {
    params
  });

// TABLE中翻译车系
export const getClaimSeries = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/claimSeries`, {
    params
  });

// 删除
export const deleteDc = params => axios.put(`${SERVER.AUDI_CLAIM}/administration/partIn/deleteDc`, params);

// 保存出库数据之后，跳到主页面，根据id查询数据，之后进行 打印 和 集装箱
export const getSPJ = (id, params) =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/getSPJ/${id}`, {
    params
  });

// 校验故障代码
export const jyGzdm = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/administration/partIn/jyGzdm`, {
    params
  });
